import request from '@/utils/request'

export function getClient(params) {
  return request({
    url: '/clients',
    params
  })
}

export function delClient(id) {
  return request({
    url: `/clients/${id}`,
    method: 'delete'
  })
}

export function addClient(data) {
  return request({
    url: '/clients',
    method: 'post',
    data
  })
}

export function clientCount(params) {
  return request({
    url: '/clients/count',
    params
  })
}

// 详情
export function clientDetail(id) {
  return request({
    url: `/clients/${id}`
  })
}

// 编辑
export function updateClient(data) {
  return request({
    url: `/clients/${data.id}`,
    method: 'put',
    data
  })
}

